// layui.define(['element'],function(exports){
//     var $ = layui.$;
//     $('.input-field').on('change',function(){
//         var $this = $(this),
//             value = $.trim($this.val()),
//             $parent = $this.parent();
//         if(value !== '' && !$parent.hasClass('field-focus')){
//             $parent.addClass('field-focus');
//         }else{
//             $parent.removeClass('field-focus');
//         }
//     })
//     exports('login');
//
//     $.post("http://localhost:8006/User/Userlogin",{"":},function(data)
// });


layui.use(['jquery','layer','form'], function() {
        var $ = layui.jquery;
        var layer = layui.layer;
        var form = layui.form;


    $("#dl").click(function(){
        var yhm = $("#username").val();
        var mm = $("#password").val();
        var obj = {
            "pnumber":yhm,
            "userpassword":mm
        }


        $.post("http://localhost:8006/User/Userlogin",obj,function(data){
            alert(data)
            if(data=="登录成功！"){
                window.location.href='index.html';
            }else {
                alert(data);
            }
        },"text");
    });
});
